3.25 \(\int (d+e x) (a+b \tanh ^{-1}(c x^2)) \, dx\)

Optimal. Leaf size=117 \[ \frac{(d+e x)^2 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )}{2 e}+\frac{b \left (c d^2+e^2\right ) \log \left (1-c x^2\right )}{4 c e}-\frac{b \left (c d^2-e^2\right ) \log \left (c x^2+1\right )}{4 c e}+\frac{b d \tan ^{-1}\left (\sqrt{c} x\right )}{\sqrt{c}}-\frac{b d \tanh ^{-1}\left (\sqrt{c} x\right )}{\sqrt{c}} \]

[Out]

(b*d*ArcTan[Sqrt[c]*x])/Sqrt[c] - (b*d*ArcTanh[Sqrt[c]*x])/Sqrt[c] + ((d + e*x)^2*(a + b*ArcTanh[c*x^2]))/(2*e
) + (b*(c*d^2 + e^2)*Log[1 - c*x^2])/(4*c*e) - (b*(c*d^2 - e^2)*Log[1 + c*x^2])/(4*c*e)

________________________________________________________________________________________

Rubi [A]  time = 0.0930256, antiderivative size = 94, normalized size of antiderivative = 0.8, number of steps used = 10, number of rules used = 7, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.438, Rules used = {6742, 6091, 298, 203, 206, 6097, 260} \[ \frac{a (d+e x)^2}{2 e}+\frac{b e \log \left (1-c^2 x^4\right )}{4 c}+b d x \tanh ^{-1}\left (c x^2\right )+\frac{b d \tan ^{-1}\left (\sqrt{c} x\right )}{\sqrt{c}}-\frac{b d \tanh ^{-1}\left (\sqrt{c} x\right )}{\sqrt{c}}+\frac{1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right ) \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)*(a + b*ArcTanh[c*x^2]),x]

[Out]

(a*(d + e*x)^2)/(2*e) + (b*d*ArcTan[Sqrt[c]*x])/Sqrt[c] - (b*d*ArcTanh[Sqrt[c]*x])/Sqrt[c] + b*d*x*ArcTanh[c*x
^2] + (b*e*x^2*ArcTanh[c*x^2])/2 + (b*e*Log[1 - c^2*x^4])/(4*c)

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rule 6091

Int[ArcTanh[(c_.)*(x_)^(n_)], x_Symbol] :> Simp[x*ArcTanh[c*x^n], x] - Dist[c*n, Int[x^n/(1 - c^2*x^(2*n)), x]
, x] /; FreeQ[{c, n}, x]

Rule 298

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b),
2]]}, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &
&  !GtQ[a/b, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 6097

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
nh[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 - c^2*x^(2*n)), x], x
] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int (d+e x) \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \, dx &=\int \left (a (d+e x)+b (d+e x) \tanh ^{-1}\left (c x^2\right )\right ) \, dx\\ &=\frac{a (d+e x)^2}{2 e}+b \int (d+e x) \tanh ^{-1}\left (c x^2\right ) \, dx\\ &=\frac{a (d+e x)^2}{2 e}+b \int \left (d \tanh ^{-1}\left (c x^2\right )+e x \tanh ^{-1}\left (c x^2\right )\right ) \, dx\\ &=\frac{a (d+e x)^2}{2 e}+(b d) \int \tanh ^{-1}\left (c x^2\right ) \, dx+(b e) \int x \tanh ^{-1}\left (c x^2\right ) \, dx\\ &=\frac{a (d+e x)^2}{2 e}+b d x \tanh ^{-1}\left (c x^2\right )+\frac{1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right )-(2 b c d) \int \frac{x^2}{1-c^2 x^4} \, dx-(b c e) \int \frac{x^3}{1-c^2 x^4} \, dx\\ &=\frac{a (d+e x)^2}{2 e}+b d x \tanh ^{-1}\left (c x^2\right )+\frac{1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right )+\frac{b e \log \left (1-c^2 x^4\right )}{4 c}-(b d) \int \frac{1}{1-c x^2} \, dx+(b d) \int \frac{1}{1+c x^2} \, dx\\ &=\frac{a (d+e x)^2}{2 e}+\frac{b d \tan ^{-1}\left (\sqrt{c} x\right )}{\sqrt{c}}-\frac{b d \tanh ^{-1}\left (\sqrt{c} x\right )}{\sqrt{c}}+b d x \tanh ^{-1}\left (c x^2\right )+\frac{1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right )+\frac{b e \log \left (1-c^2 x^4\right )}{4 c}\\ \end{align*}

Mathematica [A]  time = 0.0576063, size = 104, normalized size = 0.89 \[ a d x+\frac{1}{2} a e x^2+\frac{b e \log \left (1-c^2 x^4\right )}{4 c}+b d x \tanh ^{-1}\left (c x^2\right )+\frac{b d \left (\log \left (1-\sqrt{c} x\right )-\log \left (\sqrt{c} x+1\right )+2 \tan ^{-1}\left (\sqrt{c} x\right )\right )}{2 \sqrt{c}}+\frac{1}{2} b e x^2 \tanh ^{-1}\left (c x^2\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)*(a + b*ArcTanh[c*x^2]),x]

[Out]

a*d*x + (a*e*x^2)/2 + b*d*x*ArcTanh[c*x^2] + (b*e*x^2*ArcTanh[c*x^2])/2 + (b*d*(2*ArcTan[Sqrt[c]*x] + Log[1 -
Sqrt[c]*x] - Log[1 + Sqrt[c]*x]))/(2*Sqrt[c]) + (b*e*Log[1 - c^2*x^4])/(4*c)

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 91, normalized size = 0.8 \begin{align*}{\frac{a{x}^{2}e}{2}}+adx+{\frac{b{\it Artanh} \left ( c{x}^{2} \right ){x}^{2}e}{2}}+b{\it Artanh} \left ( c{x}^{2} \right ) dx+{\frac{be\ln \left ( c{x}^{2}+1 \right ) }{4\,c}}+{bd\arctan \left ( x\sqrt{c} \right ){\frac{1}{\sqrt{c}}}}+{\frac{be\ln \left ( c{x}^{2}-1 \right ) }{4\,c}}-{bd{\it Artanh} \left ( x\sqrt{c} \right ){\frac{1}{\sqrt{c}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*arctanh(c*x^2)),x)

[Out]

1/2*a*x^2*e+a*d*x+1/2*b*arctanh(c*x^2)*x^2*e+b*arctanh(c*x^2)*d*x+1/4*b*e/c*ln(c*x^2+1)+b*d*arctan(x*c^(1/2))/
c^(1/2)+1/4*b*e/c*ln(c*x^2-1)-b*d*arctanh(x*c^(1/2))/c^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x^2)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.80601, size = 616, normalized size = 5.26 \begin{align*} \left [\frac{2 \, a c e x^{2} + 4 \, a c d x + 4 \, b \sqrt{c} d \arctan \left (\sqrt{c} x\right ) + 2 \, b \sqrt{c} d \log \left (\frac{c x^{2} - 2 \, \sqrt{c} x + 1}{c x^{2} - 1}\right ) + b e \log \left (c x^{2} + 1\right ) + b e \log \left (c x^{2} - 1\right ) +{\left (b c e x^{2} + 2 \, b c d x\right )} \log \left (-\frac{c x^{2} + 1}{c x^{2} - 1}\right )}{4 \, c}, \frac{2 \, a c e x^{2} + 4 \, a c d x + 4 \, b \sqrt{-c} d \arctan \left (\sqrt{-c} x\right ) - 2 \, b \sqrt{-c} d \log \left (\frac{c x^{2} - 2 \, \sqrt{-c} x - 1}{c x^{2} + 1}\right ) + b e \log \left (c x^{2} + 1\right ) + b e \log \left (c x^{2} - 1\right ) +{\left (b c e x^{2} + 2 \, b c d x\right )} \log \left (-\frac{c x^{2} + 1}{c x^{2} - 1}\right )}{4 \, c}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x^2)),x, algorithm="fricas")

[Out]

[1/4*(2*a*c*e*x^2 + 4*a*c*d*x + 4*b*sqrt(c)*d*arctan(sqrt(c)*x) + 2*b*sqrt(c)*d*log((c*x^2 - 2*sqrt(c)*x + 1)/
(c*x^2 - 1)) + b*e*log(c*x^2 + 1) + b*e*log(c*x^2 - 1) + (b*c*e*x^2 + 2*b*c*d*x)*log(-(c*x^2 + 1)/(c*x^2 - 1))
)/c, 1/4*(2*a*c*e*x^2 + 4*a*c*d*x + 4*b*sqrt(-c)*d*arctan(sqrt(-c)*x) - 2*b*sqrt(-c)*d*log((c*x^2 - 2*sqrt(-c)
*x - 1)/(c*x^2 + 1)) + b*e*log(c*x^2 + 1) + b*e*log(c*x^2 - 1) + (b*c*e*x^2 + 2*b*c*d*x)*log(-(c*x^2 + 1)/(c*x
^2 - 1)))/c]

________________________________________________________________________________________

Sympy [A]  time = 20.3369, size = 473, normalized size = 4.04 \begin{align*} \begin{cases} a d x + \frac{a e x^{2}}{2} - \frac{b c d \left (\frac{1}{c}\right )^{\frac{3}{2}} \log{\left (x + i \sqrt{\frac{1}{c}} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} + \frac{i b c d \left (\frac{1}{c}\right )^{\frac{3}{2}} \log{\left (x + i \sqrt{\frac{1}{c}} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} - \frac{2 i b c d \left (\frac{1}{c}\right )^{\frac{3}{2}} \log{\left (x - \sqrt{\frac{1}{c}} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} + b d x \operatorname{atanh}{\left (c x^{2} \right )} + \frac{4 b d \sqrt{\frac{1}{c}} \log{\left (x - i \sqrt{\frac{1}{c}} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} - \frac{4 i b d \sqrt{\frac{1}{c}} \log{\left (x - i \sqrt{\frac{1}{c}} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} - \frac{3 b d \sqrt{\frac{1}{c}} \log{\left (x + i \sqrt{\frac{1}{c}} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} - \frac{5 i b d \sqrt{\frac{1}{c}} \log{\left (x + i \sqrt{\frac{1}{c}} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} + \frac{10 i b d \sqrt{\frac{1}{c}} \log{\left (x - \sqrt{\frac{1}{c}} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} + \frac{8 i b d \sqrt{\frac{1}{c}} \operatorname{atanh}{\left (c x^{2} \right )}}{- \frac{2 i c^{2}}{c^{2}} + \frac{10 i c}{c}} + \frac{b e x^{2} \operatorname{atanh}{\left (c x^{2} \right )}}{2} + \frac{b e \log{\left (x - i \sqrt{\frac{1}{c}} \right )}}{2 c} + \frac{b e \log{\left (x + i \sqrt{\frac{1}{c}} \right )}}{2 c} - \frac{b e \operatorname{atanh}{\left (c x^{2} \right )}}{2 c} & \text{for}\: c \neq 0 \\a \left (d x + \frac{e x^{2}}{2}\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*atanh(c*x**2)),x)

[Out]

Piecewise((a*d*x + a*e*x**2/2 - b*c*d*(1/c)**(3/2)*log(x + I*sqrt(1/c))/(-2*I*c**2/c**2 + 10*I*c/c) + I*b*c*d*
(1/c)**(3/2)*log(x + I*sqrt(1/c))/(-2*I*c**2/c**2 + 10*I*c/c) - 2*I*b*c*d*(1/c)**(3/2)*log(x - sqrt(1/c))/(-2*
I*c**2/c**2 + 10*I*c/c) + b*d*x*atanh(c*x**2) + 4*b*d*sqrt(1/c)*log(x - I*sqrt(1/c))/(-2*I*c**2/c**2 + 10*I*c/
c) - 4*I*b*d*sqrt(1/c)*log(x - I*sqrt(1/c))/(-2*I*c**2/c**2 + 10*I*c/c) - 3*b*d*sqrt(1/c)*log(x + I*sqrt(1/c))
/(-2*I*c**2/c**2 + 10*I*c/c) - 5*I*b*d*sqrt(1/c)*log(x + I*sqrt(1/c))/(-2*I*c**2/c**2 + 10*I*c/c) + 10*I*b*d*s
qrt(1/c)*log(x - sqrt(1/c))/(-2*I*c**2/c**2 + 10*I*c/c) + 8*I*b*d*sqrt(1/c)*atanh(c*x**2)/(-2*I*c**2/c**2 + 10
*I*c/c) + b*e*x**2*atanh(c*x**2)/2 + b*e*log(x - I*sqrt(1/c))/(2*c) + b*e*log(x + I*sqrt(1/c))/(2*c) - b*e*ata
nh(c*x**2)/(2*c), Ne(c, 0)), (a*(d*x + e*x**2/2), True))

________________________________________________________________________________________

Giac [A]  time = 1.31647, size = 166, normalized size = 1.42 \begin{align*} b c^{3} d{\left (\frac{\arctan \left (\sqrt{c} x\right )}{c^{\frac{7}{2}}} + \frac{\arctan \left (\frac{c x}{\sqrt{-c}}\right )}{\sqrt{-c} c^{3}}\right )} + \frac{b c x^{2} e \log \left (-\frac{c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c x^{2} e + 2 \, b c d x \log \left (-\frac{c x^{2} + 1}{c x^{2} - 1}\right ) + 4 \, a c d x + b e \log \left (c^{2} x^{4} - 1\right )}{4 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x^2)),x, algorithm="giac")

[Out]

b*c^3*d*(arctan(sqrt(c)*x)/c^(7/2) + arctan(c*x/sqrt(-c))/(sqrt(-c)*c^3)) + 1/4*(b*c*x^2*e*log(-(c*x^2 + 1)/(c
*x^2 - 1)) + 2*a*c*x^2*e + 2*b*c*d*x*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 4*a*c*d*x + b*e*log(c^2*x^4 - 1))/c